const {decode} = require('../utils')

module.exports = function(request,response,next){
    let token = request.headers.token
    decode(token).then((value)=>{
        next()
    }).catch(e=>{
        response.json({
            code:9,
            msg:'token异常：' + e
        })
    })
}